package com.hnkywl.sts.service.base;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.hnkywl.sts.dao.base.ClxxDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.Map;

/**
 * Created by Administrator on 2016/6/22.
 */
@Service
public class ClxxService {
    private ClxxDao clxxDao;

    @Transactional
    public String findClxxList(String clh,String xshth, Date ccrqstart, Date ccrqend, String ccch, String zzyhmc, int pageNo, int pageSize) {
        Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
        Map<String, Object> map = clxxDao.findClxxList(clh, xshth,ccrqstart, ccrqend, ccch, zzyhmc, pageNo, pageSize);
        return gson.toJson(map);
    }


    @Autowired
    public void setClxxDao(ClxxDao clxxDao) {
        this.clxxDao = clxxDao;
    }
}
